Optimal Binary Search Trees with Near Minimal Height

نویسنده

  • Peter Becker
چکیده

Suppose we have n keys, n access probabilities for the keys, and n+1 access probabilities for the gaps between the keys. Let hmin(n) be the minimal height of a binary search tree for n keys. We consider the problem to construct an optimal binary search tree with near minimal height, i.e. with height h ≤ hmin(n) +∆ for some fixed ∆. It is shown, that for any fixed∆ optimal binary search trees with near minimal height can be constructed in time O(n). This is as fast as in the unrestricted case. So far, the best known algorithms for the construction of height-restricted optimal binary search trees have running time O(Ln), whereby L is the maximal permitted height. Compared to these algorithms our algorithm is at least faster by a factor of log 2 n, because L is lower bounded by log 2 n.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Profile and Height of Random Binary Search Trees

The purpose of this article is to survey recent results on distributional properties of random binary search trees. In particular we consider the profile and the height.

متن کامل

Building Optimal Binary Search Trees from Sorted Values in O(N) Time

First, we present a simple algorithm which, given a sorted sequence of node values, can build a binary search tree of minimum height in O(N) time. The algorithm works with sequences whose length is, a priori, unknown. Previous algorithms [1-3] required the number of elements to be known in advance. Although the produced trees are of minimum height, they are generally unbalanced. We then show ho...

متن کامل

New Ways to Construct Binary Search Trees

We give linear-time algorithms for re-ordering and heightrestricting a binary search tree with only a small increase in cost, constructing a nearly optimal binary search tree given the rank by probability of each possible outcome, and height-restricting an optimal binary search tree when the increase in cost is restricted. Whereas most algorithms for constructing good binary search trees need t...

متن کامل

ISA[ k ] Trees: a Class of Binary Search Trees with Minimal or Near Minimal Internal Path Length

In recent years several authors have investigated binary search trees with minimal internal path length. In this paper we propose relaxing the requirement of inserting all nodes on one level before going to the next level. This leads to a new class of binary search trees called ISA[k] trees. We investigated the average locate cost per node, average shift cost per node, total insertion cost, and...

متن کامل

Optimal Rebalancing of Binary Search Trees

We give, for any reasonable function f, a scheme for rebalancing a binary search tree with amortized O(f(n)) work per update while guaranteeing a height bounded by dlog(n+1)+1=f(n)e for all n. As a corollary, in the semi-dynamic case, height dlog(n+1)e can be guaranteed with amortized O(log n) work per insertion. Both results match existing lower bounds, and hence provide an exact characterizat...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1011.1337  شماره 

صفحات  -

تاریخ انتشار 2010